<template>
  <div class="mb-30">
    <v-alert type="info" class="mb-10">
      <div slot="message">
        <div>
          数据是树结构， 除了要开启 <span class="blue-text"> transform </span>;
          还要设置 <span class="blue-text"> transformSetup </span>
        </div>
      </div>
    </v-alert>
    <vcu-table
      ref="xTable"
      show-overflow
      highlight-hover-row
      highlight-current-row
      :height="300"
      :columns="tableColumn"
      :data="tableData"
      :tree-config="{
        trigger: 'row',
        transform: true,
        transformSetup: { children: 'children', createId: true },
      }"
      :scroll-y="{ gt: 20 }"
    >
    </vcu-table>
  </div>
</template>
<script>
import tableDatas from "./response.js";
export default {
  data() {
    return {
      loading: false,
      tableColumn: [
        { type: "seq", treeNode: true },
        { field: "XMMC00", title: "名称" },
        { field: "BH0000", title: "编号" },
        { field: "LEVEL", title: "层级" },
        { field: "FLAG00", title: "状态" },
      ],
      tableData: tableDatas.payload,
    };
  },
  mounted() {},
  methods: {},
};
</script>
